<% if @user.errors.any? %>
<div id="error_explanation">
    <div class="alert alert-danger">
        The form contains <%= pluralize(@user.errors.count, "error") %>.
        </div>
          <ul>
            <% @user.errors.full_messages.each do |msg| %>
                    <li><%= msg %></li>
      <% end %>
                </ul>
                </div>
     <% end %>